<div class="headerBox">
    <div class="pageH">
        <div class="logBox">
            <a href="/"><img src="/public/novel/images/logo.png"></a>
        </div>
        <div class="menuBox">
            <ul class="clearfix">
                <li class="{if isset($nav) && $nav=='index'}hove{/if}"><a href="/">首页</a></li>
                <li class="{if isset($nav) && $nav=='bookall'}hove{/if}"><a href="/books">书库</a></li>
                <li class="{if isset($nav) && $nav=='booktop'}hove{/if}"><a href="/top">排行</a></li>
				
                <li class="{if isset($nav) && $nav=='payindex'}hove{/if}"><a href="#" onclick="gopay()">充值</a></li>
                <li class="" style="width:100px"><a href="#" onclick="gowrites()">作家专区</a></li>
                <!---->
            </ul>
        </div>
        <div class="menuBoxSo clearfix">
            <input type="text" name="keysWord" id="keysWord" value="" placeholder="请输入书名/作者"><span>搜索</span>
        </div>
        {if $Think.session.user_auth.uid}
			<div class="menuUserBox HeadPic"><img src="{$Think.session.user_auth.uid|get_avatar=###}"></div>
			<div class="menuUserBox toUser"><a href="/personal/info/">{$Think.session.user_auth.uid|get_nickname}</a></div>
			<div class="menuUserBox unLogin"><a href="/logout">退出</a></div>
        {else}
			{if $nav !="Login/index"}
				{if !empty($Think.config.wx_pc_apiid)}
				<div class="loginBox Weixin" title="微信登录" id="loginWeixin"></div>
				{/if}
				{if !empty($Think.config.qq_apiid)}
				<div class="loginBox Qq" title="QQ登录" id="loginBoxQq"></div>
				{/if}
				{if !empty($Think.config.weibo_apikey)}
				<div class="loginBox Weibo" title="微博登录" id="loginWeibo"></div>
				{/if}
				{if !empty($Think.config.smskey)}
				<div class="loginBox Phone" id="loginPhone" title="手机登录"></div>
				{/if}
			{/if}
        {/if}

    </div>
</div>
<script type="text/javascript">
	var is_login = {if $Think.session.user_auth.uid>0}1{else/}0{/if};
    $(document).ready(function(){
        $(".menuBoxSo span").click(function(){
            var keyName=$("#keysWord").val();
            location.href="/books?channel=0&cate=&fullflag=&upday=&keyword="+keyName;
        });
    });

    function gopay(){
		if (is_login>0)
		{
			window.location.href = '/pay/index';
			return false;
		}else{
			$.loginBox('/pay/index');
			return false;
		}
		
    }
	function gowrites(){
		if (is_login>0)
		{
			window.location.href = "{:config('writer_url')}";
			return false;
		}else{
			$.loginBox('/pay/index');
			return false;
		}
    }
</script>